package com.study.行为型模式.访问者模式;

public class Client {

    public static void main(String[] args) {

        //创建ObjectStructure
        ObjectStructure objectStructure = new ObjectStructure();

        //添加评选团
        objectStructure.attach(new Man());
        objectStructure.attach(new Man());
        objectStructure.attach(new Man());

        //成功
        Success success = new Success();
        objectStructure.display(success);

        //失败
        Fail fail = new Fail();
        objectStructure.display(fail);

        //待定
        Wait wait = new Wait();
        objectStructure.display(wait);
    }
}
